{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "\n",
    "手动下载安装\n",
    "------\n",
    "\n",
    "如果需要手动下载，请点击以下链接下载 [Stable](https://download.docker.com/mac/stable/Docker.dmg) 或 [Edge](https://download.docker.com/mac/edge/Docker.dmg) 版本的 Docker for Mac。\n",
    "\n",
    "如同 macOS 其它软件一样，安装也非常简单，双击下载的 .dmg 文件，然后将鲸鱼图标拖拽到 Application 文件夹即可。\n",
    "\n",
    "![](https://www.runoob.com/wp-content/uploads/2018/01/1515480386-7270-1293367-9516b2edf79deee7.png)\n",
    "\n",
    "从应用中找到 Docker 图标并点击运行。可能会询问 macOS 的登陆密码，输入即可。\n",
    "\n",
    "![](https://www.runoob.com/wp-content/uploads/2018/01/1515480613-7638-docker-app-in-apps.png)\n",
    "\n",
    "点击顶部状态栏中的鲸鱼图标会弹出操作菜单。\n",
    "\n",
    "![](https://www.runoob.com/wp-content/uploads/2018/01/1515480612-6026-whale-in-menu-bar.png)\n",
    "\n",
    "启动终端后，通过命令可以检查安装后的 Docker 版本。\n",
    "\n",
    "```sh\n",
    "$ docker --version\n",
    "Docker version 17.09.1-ce, build 19e2cf6\n",
    "\n",
    "```"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "镜像加速\n",
    "----\n",
    "\n",
    "鉴于国内网络问题，后续拉取 Docker 镜像十分缓慢，我们可以需要配置加速器来解决，我使用的是网易的镜像地址：<http://hub-mirror.c.163.com>\n",
    "\n",
    "在任务栏点击 Docker for mac 应用图标 -> Perferences... -> Docker Engine。在列表中填写加速器地址即可。修改完成之后，点击 Apply & Restart 按钮，Docker 就会重启并应用配置的镜像地址了。\n",
    "\n",
    "![](https://md-picture-1254350681.cos.ap-beijing.myqcloud.com/20201119154916.png)\n",
    "\n",
    "之后我们可以通过 docker info 来查看是否配置成功。\n",
    "\n",
    "```sh\n",
    "$ docker info\n",
    "...\n",
    "Registry Mirrors:\n",
    " http://hub-mirror.c.163.com\n",
    "Live Restore Enabled: false\n",
    "\n",
    "```"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.7"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {},
   "toc_section_display": true,
   "toc_window_display": true
  },
  "varInspector": {
   "cols": {
    "lenName": 16,
    "lenType": 16,
    "lenVar": 40
   },
   "kernels_config": {
    "python": {
     "delete_cmd_postfix": "",
     "delete_cmd_prefix": "del ",
     "library": "var_list.py",
     "varRefreshCmd": "print(var_dic_list())"
    },
    "r": {
     "delete_cmd_postfix": ") ",
     "delete_cmd_prefix": "rm(",
     "library": "var_list.r",
     "varRefreshCmd": "cat(var_dic_list()) "
    }
   },
   "types_to_exclude": [
    "module",
    "function",
    "builtin_function_or_method",
    "instance",
    "_Feature"
   ],
   "window_display": false
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
